package com.unionpay.service.common.excel;

import java.util.HashSet;
import java.util.Set;

/**
 * @ClassName ExcelMapper
 * @Description: excel映射关系
 * @Author xsl
 * @Date 2021/1/14
 */
public class ExcelMapper {
    private Set<ExcelField> mapper;

    public static ExcelMapper build(Set<ExcelField> mapper){
        ExcelMapper excelMapper = new ExcelMapper();
        excelMapper.mapper = mapper;
        return excelMapper;
    }

    public static ExcelMapper build(){
        ExcelMapper excelMapper = new ExcelMapper();
        excelMapper.mapper = new HashSet<>();
        return excelMapper;
    }

    public ExcelMapper addField(ExcelField excelField){
        this.mapper.add(excelField);
        return this;
    }

    protected Set<ExcelField> getMapper(){
        return mapper;
    }

}